/*
 * @Description: 
 * @Author: liuzl
 * @Date: 2024-09-04 11:24:48
 * @LastEditors: liuzl
 * @LastEditTime: 2024-09-04 14:40:08
 */
import java.util.Arrays;
public class Test02ArrayUtil{
    public static void main(String[] args){
        int[] array = {1,2,3,4,5,6,7,8};
        //获得数组的字符串输出
        String arrayStr = Arrays.toString(array);
        System.out.println("arrayStr: "+arrayStr);
        System.out.println("array.length: "+array.length);//8
        //拷贝数组
        array = Arrays.copyOf(array,10);
        System.out.println("array.length: "+array.length);//10
        System.out.println("Arrays.toString(array): "+Arrays.toString(array));//
        //数组排序
        int[] arr1 = new int[]{1,3,5,2,4,6};
        System.out.println(Arrays.sort(arr1));


    }
}